package com.treeroot.orderservice.order.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 订单
 * </p>
 *
 * @author TreeRoot
 * @since 2022-05-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "PcOrder对象", description = "订单")
public class PcOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "订单号")
    private String orderNo;

    @ApiModelProperty(value = "航班id")
    private String planeId;

    @ApiModelProperty(value = "出发城市")
    private String startCity;

    @ApiModelProperty(value = "到达城市")
    private String endCity;


    @ApiModelProperty(value = "起飞时间")
    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    private String flightStartTime;

    @ApiModelProperty(value = "降落时间")
    @JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
    private String flightEndTime;


    @ApiModelProperty(value = "座位号")
    private Integer seating;

    @ApiModelProperty(value = "用户id")
    private String userId;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "手机")
    private String phone;

    @ApiModelProperty(value = "订单金额（分）")
    private Integer totalFee;

    @ApiModelProperty(value = "支付类型（1：微信 2：支付宝）")
    private Integer payType;

    @ApiModelProperty(value = "订单状态（0：未支付 1：已支付）")
    private Integer status;


    @ApiModelProperty(value = "乐观锁")
    @Version
    private Long version;

    @ApiModelProperty(value = "逻辑删除 1（true）已删除， 0（false）未删除")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    @ApiModelProperty(value = "航班类型 ")
    private String planeType;

    @TableField(exist = false)
    @ApiModelProperty(value = "行为类型 ")
    private String type;

    @TableField(exist = false)
    @ApiModelProperty(value = "日志表id ")
    String logId;


}
